#include "stdafx.h"
#include "MissileBase.h"
#include "Input.h"


CMissileBase::CMissileBase()
{
}

CMissileBase::CMissileBase(float x_, float y_, float w_, float h_, int texture_) :CSprite(x_, y_, w_, h_, texture_)
{

}


CMissileBase::~CMissileBase()
{
}

void
CMissileBase::update()
{
	if (CInput::getInstance()->getIfKeyDown(DIK_LEFT))
	{
		m_fX -= 0.01;
	}

	if (CInput::getInstance()->getIfKeyDown(DIK_RIGHT))
	{
		m_fX += 0.01;
	}

	/*if (CInput::getInstance()->getIfKeyDown(DIK_DOWN))
	{
		m_fY -= 0.01;
	}

	if (CInput::getInstance()->getIfKeyDown(DIK_UP))
	{
		m_fY += 0.01;
	}*/

	if (m_fX >= 3)
	{
		m_fX = 3;
	}
	if (m_fX <= -3)
	{
		m_fX = -3;
	}
}